# -*- coding: utf-8 -*-
"""
Created on Thu Aug 25 12:30:44 2022

@author: xiong
"""
from requests_html import HTMLSession

class ProxyValidTester():
    error = ""
    def __init__(self,proxy = ""):
        session = HTMLSession()
        try:
            r = session.get(r"https://www.google.com",proxies = proxy,timeout = 5)
            if r.status_code != 200:
                self.error = "status error:code = "+ str(r.status_code)
        except Exception as e:
            self.error = e
            
        
            